<?php

namespace app\api\controller;
use app\api\model\Fake as ModelFake;


class Fake extends Base
{

    public function use()
    {
        $fake = input('fake');
        // 查询用户信息
        $res = (new ModelFake)->useFake($fake, $this->uid);
        if ($res) return success();
        return error($res);
    }
    // 兑换列表
    public function list()
    {
        $list = ModelFake::field('type,value,use_time')->where(['status' => 1, 'use_user_id' => $this->uid])->paginate(10);
        return success($list);
    }
}
